A few notes from CptnVic:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
In this document:
	* Improvements In This Build
	* Minimum Requirements
	* Copyright stuff for this project
	* Using the code in your project
	* Custom Icons... extracting and painting on the form
	* Changing color themes in this project
	* Tweaking appearance/functionality
	* Relative Positioning of the Message/Input boxes
	* Known bugs
	* ToDo
	* Option explicit... save your emails!
	* Further reduction of code size... not only possible... recommended!
	* A Preview of your message box recommended

---[ Improvements In This Build ]-------------------------------------------
	* Drastic reduction in code/frx weight with improved speed/results
	* Now only one control on form... if I were smart enough... I'd get rid of it!
	* Much improved gradient code and added gradient option for prompt area
	* Added owner drawn icons w/o using picture boxes, etc.
	* Improved form location code
	* Added multiple-line title bars
	* Added word wrap code for title bars and prompt text areas (using same code)
	* Added a NagScreen option for which I may later be sorry!
	* Now Only A Single function to call to produce all variations!

The sort of cool thing about this build is the ability to play around with the results
of the function call... by setting some flags... As far as I can tell, the worst thing 
that happens from experimenting with the function is a poor looking message box...
BUT it's fun trying!

Check out snap_shot.gif to see a small example of what you might expect!

---[ Minimum Requirements ]---------------------------------------------------

Hardly any.  If you compiled the test project, you shouldn't even have to 
install it on any computer that had:
	NT 3.1 or higher
	Windows 95 or higher
(and that's just because of the api)

Backwards compatibility:
Should be compatible (but only tested in VB6) with
	VB 4-32bit
	VB 5
	VB 6
so there!

I have not had time to test this project on XP... but see no reason why it
wouldn't work just fine.  Let me know if it does not play well with XP or
other OS.
-----------------------------------------------------------------------------

---[ Copyright stuff for this project ]---------------------------------------

Look at the code!  Everything in this project is as harmless as I know how to
make it.  However, you may only use this code if you agree to hold harmless
the author of this code.

Otherwise, I don't give a rats as... er... care how you use it.  You can use it,
throw it away, sell it, compile it, re-decompile it... or do what ever you 
want... just don't blame me for what ever you do.  And don't claim that you 
authored the code or own the code.

For our purposes, I retain ownership of the code and may use it as I wish.  I
grant you the right to use the code as you see fit as long as your use does
not infringe on my rights as the owner/author of this code.

Is that clear enough?  If not... DON'T use the code.

Sure, some credit would be nice... but the truth is that I learn more from
examining other's code than others EVER will examining mine... so think 
of this as a repayment of sorts for your much better and more sophisticated work.
------------------------------------------------------------------------------

---[ Using the code in your project ]-----------------------------------------

The primary reason I was attracted to this project was the simplicity of
implementation.  All you have to do to implement my code in your project is:

1)  Add the form files: frmMsgBox.frm and frmMsgBox.frx
    To your project.  There are no *.bas files or other to add.
    Note: The ONLY reason you need to add the frmMsgBox.frx file to your project is that
	it stores the "hand pointer" cursor that is used during mouse-over
	events.  If you don't like or need this effect, you can skip the frmMsgBox.frx
	and change the mouse-over code where needed... and save about 3k in size.

2)  Call the function that shows the message/input boxes (really, a form).
    It is:

    frmMsgBox.ShowMsgBox(MsgTitle As String, MsgPrompt As String, [Optional MsgMode,...]
    Don't forget to reference the form.  That's all there is to it!  You can call it from
    anywhere/any form in your project.

	What you get is a completely customizable message box or input box
	depending on the parameters you pass to the function.

	frmMsgBox.ShowMsgBox Function returns a string which:
		For Message boxes: Represents the button clicked
		(See more below)

		For Input boxes: Represents the text in the text box.

    There are 4 possible buttons... on the bottom (3) and a close button on top.
    All, some, or none may be displayed depending on your function call parameters.
    In any event they are always handled as:
	Bottom buttons:
		Left: Considered to be the OK button (msgbox returns "0")
		Middle: Considered to be the CANCEL button (msgbox returns "1")
		Right: Considered to be the RETRY button (msgbox returns "2")
	Top "X" Close button
		Msgbox returns "3"
	Examine the function for more info!

---------------------------------------------------------------------------------------------

---[ Custom Icons... extracting and painting on the form ]-----------------------------------

I often want to provide a custom icon (company logo, etc.) for use.  While the api to extract
registered Icons is pretty straight forward, the api to extract it from the message box is not
readily apparent to me.  Therefore, when I want to do such a thing, I simply use the properties
window to set the icon for frmMsgBox to the desired icon, add a picture box that is invisible,
and change the code in: Private Sub DoIconThing(IconNum As Integer)

You will also need to change the case statement, but I find it easily replaces the application
icon - which I do not find useful.  See the DoIconThing sub for more info.

---[ Changing color themes in this project ]-------------------------------------------------

The buttons for this project are drawn using an array of colors.  The array of
colors is used to draw borders, gradients, etc on your form.

The color array is initialized in the DoFormStuff sub, gradient work is done in the
DrawGradient sub.

A look at these subs will show you (for example):

SColorScheme(3, 0) = 206: SColorScheme(3, 1) = 214: SColorScheme(3, 2) = 189 'olive

This represents the array for the 3rd (Olive...ish) color scheme.  Since I have used white
... RGB(255,255,255) as the top of the gradient... I need to know the "darkest" component of
the gradient.  In this example, the darkest component resolves to:
... RGB(206,214,189)... (although I haven't checked... I'm not sure it ever gets there!)
AND RGB(206,214,189) is used to draw the border around the message/input box AND create
the gradients.  (* except for white!... where I default to gray.)

You can create your own custom color schemes by simply changing the color arrays in the
DoFormStuff sub.

-------------------------------------------------------------------------------------------

---[ Tweaking appearance/functionality ]---------------------------------------------------

Other than the section above, the cool thing about this project is that it give you alot
more control over how your message/input box apprear.

Change the settings (font bold... color... etc) by passing the variables in the functions.

If you want to "dock" the form somewhere:

   Dock to left side: 
	Enter a BoxLeft value < -2 (or -2000... any # < -1)
	Disable the drag... Dragit = False

   Dock to right side:
	Enter a BoxLeft value > than any monitor in earth... ie. 5000
	Disable the drag... Dragit = False

   Dock to top:
	Enter a BoxTop value < -2 (or -2000... any # < -1)
	Disable the drag... Dragit = False

   Dock to bottom:
	Enter a BoxTop value > than any monitor in earth... ie. 5000
	Disable the drag... Dragit = False

For all monitors not on earth... you're on your own.

IMPORTANT:
The word-wrap routines split text on the vbCrLf only.  To force line breaks... use vbCrLf
in passing text to the function.

TIP:
If a button is too narrow to suit you (for instance, an "OK" button can be very narrow),
add an even number of spaces to either side of the text... (ie, "   OK   ") when passing
button text to the function.  I have not provided code to word wrap the button text.

I've tried to locate all of the variables I use most at the top of the list... to make it
easier... but you can add or delete them as you like.

In addition, you can change return values of the function as you see fit.
------------------------------------------------------------------------------------------

---[ Relative Positioning of the Message/Input boxes ]------------------------------------

I'm not going to do this for you in this demo... but if you want, you can very easily
change the code to provide relative positioning of your message/input box (for instance:
relative to a mouse X,Y click) by changing the ByVal references to ByRef references, and
passing these values to the BoxLeft and BoxTop vars.

If you don't understand this... forget it... but trust me... it'll work. 

---[ Known bugs ]-------------------------------------------------------------------------

None that I know of... although I DID knock back a few beers during the re-size code... I
haven't (hick-up) found any bad problems with it yet.

I generally debug my code till I never get done.  However, I will admit that I have not
tried to change every attribute of every component in this project.

If you find one... fix it and/or let me know.
------------------------------------------------------------------------------------------

---[ ToDo ]-------------------------------------------------------------------------------

I'm thinking... add a default somehow to some button... then kill myself...
since life will be good for a change.
------------------------------------------------------------------------------------------

---[ Option explicit... save your emails! ]-----------------------------------------------

You wouldn't turn on Option Explicit either if you knocked back a few beers while working!
If you can't stand it... add it.  I promise... there won't be that many un-dimensioned
variables.  Generally, I declare them if I plan to use them for more than a line or 2 of
code.  I always try to name variables so stupidly that NO ONE in their right mind would
have a conflict!  ANYWAY, get a grip!
------------------------------------------------------------------------------------------

---[ Further reduction of code size... not only possible... recommended! ]----------------

A review of the frmMsgBox.ShowMsgBox function will quickly reveal that the bulk of the 
code is dedicated to resizing the form and error trapping.  If you plan to use the function
in your project and want a nice looking message/input box, you could remove much of this
code and simply preview your message/input boxes to make sure the desired results are
achieved.

------------------------------------------------------------------------------------------

---[ A Preview of your message box recommended ]------------------------------------------

(This will make more sense if you read the section above!)
The resize/word-wrap/resize loops in the ShowMsgBox function are the most complicated part
of this code.  This is because of the combinations of options.

In general, my aim was to provide a message/input box of the smallest dimensions.  In order
to accomplish this, I compare the (printed size) Title text and Prompt text first and select
the largest requirement.  Then, I adjust for icons and a close button that may affect the
resize needs... and limit the box to 90% (arbitrarily) of the user's screen size.

IF the space requirements of the Title or Prompt text exceeds the 90% limit, I word-wrap
the text and resize again.

The result of this may not be desireable if, for example, you provide a short Title, and a
multi-line prompt text in which only one sentence is longer than the 90% limit.  The result
might be that you would create a very long... very short message box.  

The point of this is:

If you don't like the way the message box is presented, place a vbCrLf as needed to hard
code the line breaks into your message boxes.  See the demo project code for some examples
of this.
2) 